<?php

/**
 * 导航分类 (category) Controller
 * ============================================================================
 * TBlog TBlog博客系统　BY Tmac PHP MVC framework
 * $Author: zhangwentao $  <zwttmac@qq.com>
 * $Id: category.php 1637 2011-03-21 07:24:24Z zhangwentao $
 * http://www.t-mac.org；
 */
class categoryAction extends Action
{

    public function _init()
    {
        $this->assign('action', $_GET['TMAC_ACTION']);
        $this->tmp_model = Tmac::model('category');

        $this->assign('cfg_webname', $GLOBALS['cfg_webname']);
        $this->assign('cfg_keywords', $GLOBALS['cfg_keywords']);
        $this->assign('cfg_description', $GLOBALS['cfg_description']);
        $this->assign('cfg_powerby', $this->HD($GLOBALS['cfg_powerby']));
        $this->assign('cfg_indexurl', $GLOBALS['cfg_indexurl']);
        $this->assign('picurl', $GLOBALS['TmacConfig']['config']['picurl']);
        $this->assign('ZNpicurl', $GLOBALS['TmacConfig']['config']['ZNpicurl']);
    }

    public function index()
    {
        $cat_id = $this->getParam('cat_id');
        if (empty($cat_id)) {
            $this->redirect('请选择导航分类');
            exit;
        }

        $cat_info = $this->tmp_model->getCatInfo($cat_id);
        $alllink = $this->tmp_model->getAlllink($cat_id);
//        print_r($rs);
        $this->V('category');
    }

}